let Service = require('node-windows').Service;  
  
let svc = new Service({  
  name: 'nodejs_server',    //服务名称  
  description: '实训项目服务器', //描述  
  script: 'C:/root/yifanshopsys/bin/www' //nodejs项目要启动的文件路径  
});  
  
svc.on('install', () => {  
  svc.start();  
});  
  
svc.install(); 